<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试页面</title>
    <script src="echarts-2.2.7/build/dist/echarts-all.js"></script>
</head>
<body>
<div id="main" style="height:400px"></div>
</body>
</html>
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts图表
    var myChart = echarts.init(document.getElementById('main'));

    var option = {
        series_key:[{key:"stat_time", title:"统计时间"}],
        tooltip : {
            trigger: 'axis'
        },
        legend: {
            data:['蒸发量','降水量']
        },
        toolbox: {
            show : true,
            feature : {
                mark : true,
                dataView : {readOnly: false},
                magicType:['line', 'bar'],
                restore : true,
                saveAsImage : true
            }
        },
        calculable : true,
        xAxis : [
            {
                type : 'category',
                data : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
            }
        ],
        yAxis : [
            {
                type : 'value',
                splitArea : {show : true}
            }
        ],
        series : [{
            name:'蒸发量',
            type:'bar',
            data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]
        },
            {
                name:'降水量',
                type:'line',
                data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
            }]
    };

    // 为echarts对象加载数据
    myChart.setOption(option);
</script>